package cn.leaf.web.exception;

/**
 *
 * description: biz exception
 *
 * @author Cyril
 * @version v1.0.0
 * @since 2021-05-29 21:00:03
 *
 */
public class BizException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    /**
     * code
     */
    private int    code = 500;
    /**
     * 错误信息
     */
    private final String message;

    public BizException(String message) {
        this.message = message;
    }

    public BizException(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

}
